package xcmg.device.dao.mapper.warehouse;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import xcmg.device.dao.entity.warehouse.AbnormalInDetailDO;
import xcmg.device.service.vo.warehouse.AbnormalInDetailVO;

import java.util.List;

@Mapper
public interface AbnormalInDetailMapper {
    int deleteByPrimaryKey(String id);

    int insert(AbnormalInDetailDO record);

    AbnormalInDetailDO selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(AbnormalInDetailDO record);

    int updateByPrimaryKey(AbnormalInDetailDO record);

    List<AbnormalInDetailDO> findByAbnormalNo(@Param("abnormalNo") String abnormalNo, @Param("orgId") String orgId);

    List<AbnormalInDetailDO> findByAbnormalNoForLocationUser(@Param("abnormalNo") String abnormalNo, @Param("orgId") String orgId);

    int deleteByAbnormalNo(@Param("abnormalNo") String abnormalNo, @Param("orgId") String orgId);

    List<AbnormalInDetailDO> list(AbnormalInDetailVO vo);

    int removeByInOrderList(@Param("orderList") List<String> orderList, @Param("orgId") String orgId);

    List<AbnormalInDetailDO> findByAbnormalNos(@Param("orderList") List<String> orderList, @Param("orgId") String orgId);

    int updateStateNoBarcode(@Param("status") Integer status, @Param("businessOrder") String businessOrder, @Param("materialNo")String materialNo , @Param("orgId") String orgId);

    AbnormalInDetailDO getByMaterialsNo(@Param("materialsNo") String materialsNo, @Param("abnormalNo") String abnormalNo);

    int updatePostAmount(@Param("businessOrder") String businessOrder, @Param("materialNo")String materialNo , @Param("orgId") String orgId, @Param("voucherNo")String voucherNo);

    int findPostStatus(@Param("billNo")String billNo);

    int updatePostStatus(@Param("billNo")String billNo, @Param("postStatus")int postStatus);

    int updateVoucherNoNone(@Param("billNo") String billNo, @Param("materialsNo") String materialsNo);
}